﻿using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Shapes;
using HalconDisplayControl.Attributes;
using HalconDotNet;

namespace HalconDisplayControl.Shape
{
    public class Rectangle1Shape : IShape
    {
        [ParamName("column1")]
        public double Column1 { get; set; } = 0;
        [ParamName("row1")]
        public double Row1 { get; set; } = 0;
        [ParamName("column2")]
        public double Column2 { get; set; } = 100;
        [ParamName("row2")]
        public double Row2 { get; set; } = 50;

        public void CreateDrawingObj(out HTuple drawId)
        {
            HOperatorSet.CreateDrawingObjectRectangle1(Row1, Column1, Row2, Column2, out drawId);
        }

        public void CreateShapeObj(out HObject shapeObj)
        {
            HOperatorSet.GenRectangle1(out shapeObj, Row1, Column1, Row2, Column2);
        }
    }
}
